import BaseLayout from '../../layouts/BaseLayout.vue';
import BaseLogin from '../../views/Login/index.vue';
import {ref} from "vue";

const routes_mock = ref([
  {
    path: '/sqlData/:execute_id',
    component: () => import('../../components/scene/data/ReviewData.vue'),
    meta: { title: '数据预览' },
  },
  {
    name: 'viewSqlRecord',
    path: '/sqlRecord/:execute_id',
    component: () => import('../../components/scene/data/RecordSql.vue'),
    meta: { title: 'SQL执行记录' },
  },
  {
    path: '/user',
    component: BaseLogin,
    meta: { title: '初始主页' },
    children: [
      {
        path: '/user/login',
        component: () => import('../../components/System/userLogin.vue'),
        meta: { title: '登录页面' },
      },
      {
        path: '/user/register',
        component: () => import('../../components/System/registerUser.vue'),
        meta: { title: '注册页面' },
      },
      {
        path: '/user/fundPwd',
        component: () => import('../../components/System/fundPwd.vue'),
        meta: { title: '找回密码' },
      }
    ]
  },
  {
    path: '/base',
    component: BaseLayout,
    meta: { title: '基础页面' },
  },
  {
    path: '/',
    redirect: '/aml/change',
    component: BaseLayout,
    meta: { title: '配置管理' },
    children: [
      {
        path: '/home',
        component: () => import('../../views/FirstPage/FirstPage.vue'),
        meta: { title: '首页' },
      },
      {
        path: '/generator',
        component: () => import('../../views/Generator/index.vue'),
        meta: { title: '数据生成器' },
      }
    ]
  },
  {
    path: '/config',
    component: BaseLayout,
    meta: { title: '配置管理' },
    children: [
      {
        path: '/config/rules',
        component: () => import('../../views/DataMock/Config/ConfigRule.vue'),
        meta: { title: '仿真规则库' },
      },
      {
        path: '/config/source',
        component: () => import('../../views/DataMock/Config/dataOrigin.vue'),
        meta: { title: '数据库管理' },
      }
    ]
  },
  {
    path: '/scene',
    component: BaseLayout,
    meta: { title: '仿真场景' },
    children: [
      {
        path: '/scene/SqlRelation',
        component: () => import('../../views/DataMock/Scene/SqlRelation.vue'),
        meta: { title: 'SQL血缘' }
      },
      {
        path: '/scene/create',
        component: () => import('../../views/DataMock/Scene/createScene.vue'),
        meta: { title: '仿真场景' },
        children: [
          {
            name: 'EditScene',
            path: '/scene/create/edit/:scene_id',
            component: () => import('../../views/DataMock/Scene/child/EditScene.vue'),
            meta: {title: '编辑场景'}
          },
          {
            name: 'SceneList',
            path: '/scene/create/table/:scene_id',
            component: () => import('../../views/DataMock/Scene/child/SceneTable.vue'),
            meta: {title: '场景列表'}
          },
          {
            name: 'SceneGroup',
            path: '/scene/create/group/:scene_id',
            component: () => import('../../views/DataMock/Scene/child/ErChart.vue'),
            meta: {title: '场景组'}
          },
          {
            name: 'NonePage',
            path: '/scene/create/none',
            component: () => import('../../views/DataMock/Scene/child/NonePage.vue'),
            meta: {title: '空页面'}
          },
          {
            name: 'viewRecord',
            path: '/scene/create/record/:scene_id',
            component: () => import('../../views/DataMock/Scene/child/ActRecord.vue'),
            meta: { title: '执行记录' },
          },
        ]
      },
      // {
      //   name: 'viewSqlRecord',
      //   path: '/sqlRecord/:execute_id',
      //   component: () => import('../../components/scene/data/RecordSql.vue')
      // },
    ]
  },
  {
    path: '/data',
    component: BaseLayout,
    meta: { title: '数据管理' },
    children: [
      {
        path: '/data/basic',
        component: () => import('../../views/DataMock/Data/baseData.vue'),
        meta: { title: '基础数据' },
      },
      {
        path: '/date/update',
        component: () => import('../../views/DataMock/Data/dataUpdate.vue'),
        meta: { title: '数据更新' },
      },
      {
        path: '/date/recover',
        component: () => import('../../views/DataMock/Data/dataRecover.vue'),
        meta: { title: '数据更新' },
      }
    ]
  },
  {
    path: '/operate',
    component: BaseLayout,
    meta: { title: '运维管理' },
    children: [
      {
        path: '/operate/count',
        component: () => import('../../views/DataMock/Operation/applicationCount.vue'),
        meta: { title: '用户管理' },
      },
      {
        path: '/operate/log',
        component: () => import('../../views/DataMock/Operation/runLog.vue'),
        meta: { title: '角色管理' },
      }
    ]
  },
  {
    path: '/system',
    component: BaseLayout,
    meta: { title: '系统管理' },
    children: [
      {
        path: '/system/user',
        component: () => import('../../views/System/user/index.vue'),
        meta: { title: '用户管理' },
      },
      {
        path: '/system/role',
        component: () => import('../../views/System/role/index.vue'),
        meta: { title: '角色管理' },
      },
      {
        path: '/system/menu',
        component: () => import('../../views/System/menu/index.vue'),
        meta: { title: '菜单权限' },
      }
    ]
  }
]);

export default routes_mock.value;